<%-- 
    Document   : insertRoute
    Created on : 16-ott-2014, 14.24.20
    Author     : cloud
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<!--
        Linear by TEMPLATED
    templated.co @templatedco
    Released for free under the Creative Commons Attribution 3.0 license (templated.co/license)
-->
<html>
    <head>
        <title>Car Sharing</title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta name="description" content="" />
        <meta name="keywords" content="" />
        <link href='http://fonts.googleapis.com/css?family=Roboto:400,100,300,700,500,900' rel='stylesheet' type='text/css'>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
        <script src="js/skel.min.js"></script>
        <script src="js/skel-panels.min.js"></script>
        <script src="js/init.js"></script>
        <script src="js/jquery-1.9.1.js"></script>
        
        <noscript>
        <link rel="stylesheet" href="css/skel-noscript.css" />
        <link rel="stylesheet" href="css/style.css" />
        <link rel="stylesheet" href="css/style-desktop.css" />
        </noscript>
    </head>
    <body>

        <!-- Header -->
        <div id="header">
            <div id="nav-wrapper"> 
                <!-- Nav -->
                <nav id="nav">
                    <ul>
                        <li><a href="index.html">Homepage</a></li>
                        <li class="active"><a href="registration.jsp">Registrazione</a></li>
                        <li><a href="insertRoute.jsp">Inserimento</a></li>
                        <li><a href="searchRoute.jsp">Ricerca</a></li>
                    </ul>
                </nav>
            </div>
            <div class="container"> 

                <!-- Logo -->
                <div id="logo">
                    <h1><a href="#">Car Sharing</a></h1>
                </div>
            </div>
        </div>
        <!-- Header --> 

        <!-- Main -->
        <div id="main">
            <div class="container">
                <div class="row">

                    <!-- Sidebar -->
                    <div id="sidebar" class="4u">
                        <section>
                            <header>
                                <h2><a href="registration.jsp">Registrazione</a></h2>
                            </header>
                        </section>
                        <section>
                            <header>
                                <h2><a href="login.jsp">Login</a></h2>
                            </header>
                        </section>
                        <section>
                            <header>
                                <h2><a href="insertRoute.jsp">Inserimento</a></h2>
                            </header>
                        </section>
                        <section>
                            <header>
                                <h2><a href="searchRoute.jsp">Ricerca</a></h2>
                            </header>
                        </section>
                    </div>

                    <!-- Content -->
                    <div id="content" class="8u skel-cell-important">
                        <section>
                            <header>
                                <h2>Inserimento</h2>
                                <span class="byline">Inserire le seguenti informazioni:</span>
                            </header>
                            <div id="errorMessage">
                            <%
                                if (request.getParameter("insertRoute")!= null && request.getParameter("insertRoute").equals("0") ) { %>
                                    <p>Inserimento del percorso non riuscito</p>
                                <% }
                                else if (request.getParameter("insertRoute")!= null && request.getParameter("insertRoute").equals("1") ) { %>
                                    <p>Percorso inserito correttamente</p>
                                <% }
                            %>    
                            </div>
                            <form method="post" action="CarSharingServlet">

                                <input type="hidden" name="insert" value="1"/>

                                <table border="1" width="50%" cellpadding="5">
                                    <thead>

                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>Partenza</td>
                                            <td><input type="text" name="address_from" value="" /></td>
                                            <td id="error"></td>
                                        </tr>
                                        <tr>
                                            <td>Arrivo</td>
                                            <td><input type="text" name="address_to" value="" /></td>
                                        </tr>
                                        <tr>
                                            <td>Ora di partenza</td>
                                            <td><input type="text" name="start_hour" value="" /></td>
                                        </tr>
                                        <tr>
                                            <td>Ora di arrivo</td>
                                            <td><input type="text" name="arrive_hour" value="" /></td>
                                        </tr>
                                        <tr>
                                            <td>Posti disponibili</td>
                                            <td><input type="text" name="seats" value="" /></td>
                                        </tr>
                                        <tr>
                                        <td><input type="submit" value="Inserisci" /></td>
                                        <td><input type="reset" value="Reset" /></td>
                                    </tr>
                                    </tbody>
                                </table>

                            </form>
                        </section>
                    </div>

                </div>
            </div>
        </div>
        <!-- /Main -->
        
        <!-- Tweet -->
        <div id="tweet">
            <div class="container">
                <section>
                    <blockquote>La tua applicazione per risparmiare benzina</blockquote>
                </section>
            </div>
            
        </div>

        <!-- Copyright -->
        <div id="copyright">
            <div class="container">
                Design: <a href="http://templated.co">TEMPLATED</a> Images: <a href="http://unsplash.com">Unsplash</a> (<a href="http://unsplash.com/cc0">CC0</a>)
            </div>
        </div>

    </body>
</html>
